// Copyright  2004-2008 Backplane Ltd.
//
// This file is part of Ubiquity formsPlayer
//
// Ubiquity formsPlayer is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
//
// Ubiquity formsPlayer is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License
// along with Ubiquity formsPlayer If not, see <http://www.gnu.org/licenses/>.
//	
//
//   Purpose: declaration of CImplRange.
//   $Id$



#pragma once
#include "SingleNodeBinding.h"
class CXFormsElementRange;
class CXFormsParseRange;
#define RANGE_TYPE_COUNT 25

class CImplRange : public CImplSingleNodeBinding
{
	//TODO:
	//	This currently only works for integral numbers,
	//	but should work for decimals and dates
	friend class CXFormsParseRange;
	friend class CXFormsElementRange;
public:
	CImplRange(CXFormsElementRange* pElement);
	virtual ~CImplRange();

public:
//	CComBSTR m_sEnd;
//	CComBSTR m_sStart;
//	CComBSTR m_sStepSize;
private:
	// Bug 608 - these attributes can have floating point values.
	double *m_dStart, *m_dEnd, *m_dStep;
	
	// List of potential base types that this control is allowed to bind to
	const static SQName sm_arrQNAvailableTypes[RANGE_TYPE_COUNT];
public:
	// range needs to check the types to which it is bound
	virtual void buildDependencies(void);
};